/**
 * <p>Title: MaterialPackageRest</p>
 * <p>Description: The Interface of Material Package</p>
 * <p>Copyright: Shanghai Batchsight Pharmaceutical Technologies, Inc. Copyright(c) 2016</p>
 * @author Huang Zhong wei
 * @version 1.0
 * <pre>Histroy:
 *       2016-11-23 Huang Zhong wei Create
 *       2016-12-14 qianpengji Create
 *</pre>
*/
package cn.jhg.account.rest;

import java.util.List;

import javax.ws.rs.DELETE;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import cn.jhg.account.entity.MaterialPackage;
import cn.jhg.account.util.ServiceResult;

/**
 * 
 * @author Huang Zhong wei
 * @author qianpengji
 */
@Path("/materialPackage")
public interface MaterialPackageRest {
    /**
   	 * <p>新增物料件</p>
   	 * @return		新增物料件的id
   	 */
	@Path("/add")
	@POST
	@Produces({ MediaType.APPLICATION_JSON, })
	public ServiceResult<Integer> addMaterialPackage(
			@QueryParam("seq") String seq,
			@QueryParam("labId") int labId,
			@QueryParam("quantitiy") double quantity,
			@QueryParam("statId") int statId,
			@QueryParam("batId") int batId,
			@QueryParam("locTranId") int locTranId,
			@QueryParam("locStoId") int locStoId,
			@QueryParam("propId") String propId,
			@QueryParam("iuid") int iuid);

    /**
  	 * <p>更新物料件</p>
  	 * @return		errorCode
  	 */
	@Path("/update")
	@PUT
	@Produces(MediaType.APPLICATION_JSON)
	public ServiceResult<Object> updatePackage(
			@FormParam("id") int id, 
			@FormParam("seq") String seq,
			@FormParam("labId") int labId, 
			@FormParam("quantitiy") double quantity,
			@FormParam("statId") int statId,
			@FormParam("batId") int batId, 
			@FormParam("locTranId") int locTranId,
			@FormParam("locStoId") int locStoId,
			@FormParam("propId") String propId,
			@FormParam("iuid") int iuid);

    /**
  	 * <p>删除物料件</p>
  	 * @return		errorCode
  	 */
	@Path("/delete")
	@DELETE
	@Produces({ MediaType.APPLICATION_JSON, })
	public ServiceResult<Object> deletePackage(
			@FormParam("id") int id, 
			@FormParam("iuid") int iuid);

	/**
	 * <p>根据id查询物料件</p>
	 * @return		物料件
	 */
	@Path("/id")
	@GET
	@Produces({ MediaType.APPLICATION_JSON, })
	public ServiceResult<MaterialPackage> queryPackageById(
			@QueryParam("id") int id, 
			@QueryParam("iuid") int iuid);

	/**
	 * <p>根据labId查询物料件</p>
	 * @return		物料件
	 */
	@Path("/labid")
	@GET
	@Produces({ MediaType.APPLICATION_JSON, })
	public ServiceResult<MaterialPackage> queryPackageByLabel(
			@QueryParam("labId") int labId, 
			@QueryParam("iuid") int iuid);

//	/**
//	 * <p>查询设备类型</p>
//	 * @return		设备类型
//	 */
//	@Path("/find")
//	@GET
//	@Produces({ MediaType.APPLICATION_JSON, })
//	public MaterialPackage findPackage(
//			@QueryParam(value = "batId") int batId,
//			@QueryParam(value = "seq") String seq,
//			@QueryParam(value = "locStoId") int locStoId, 
//			@QueryParam(value = "locTranId") int locTranId,
//			@QueryParam(value = "statId") int statId, 
//			@QueryParam(value = "iuid") int iuid);

	/**
	 * <p>查询设备类型</p>
	 * @return		设备类型
	 */
	@Path("/find")
	@GET
	@Produces({ MediaType.APPLICATION_JSON, })
	public ServiceResult<List<MaterialPackage>> findPackageDetail(
			@QueryParam("batId") int batId,
			@QueryParam("seq") String seq,
			@QueryParam("locStoId") int locStoId,
			@QueryParam("locTranId") int locTranId, 
			@QueryParam("statId") int statId,
			@QueryParam("iuid") int iuid);

}
